import service from "../../utils/request"

//添加新车线索
export const addNewCarClue = (data: NewCarClue): Promise<Result<NewCarClue>> => service.post('/newcarclue', data)

// 查询分页新车线索
export const getNewCarCluePage = (page: number, clueName: string): Promise<PageResult<ListNewCarClue[]>> => service.get(`/newcarclue/page?page=${page}&clueName=${clueName}`)

//编辑新车线索
export const editNewCarClue = (id: string, data: NewCarClue): Promise<Result<string>> => service.patch(`/newcarclue/${id}`, data)

//删除新车线索
export const delNewCarClue = (id: string): Promise<Result<string>> => service.delete(`/newcarclue/${id}`)

//批量删除新车线索
export const manyDelNewCarClue = (idList: string[]): Promise<Result<string>> => service.post('/newcarclue/delMany', idList)